﻿using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using System.Configuration;
using System.Data;
using System.Windows;

namespace GrpcServer
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        public App()
        {
            Task.Run(() => {
                var builder = WebApplication.CreateBuilder();
                builder.Services.AddGrpc();
                var app = builder.Build();
                app.MapGrpcService<DemoService>();
                app.MapGet("/",()=> "连接 grpc");
                app.Run();
                
            });

        }
   
    }

}
